#include <stdio.h>
#include <time.h>
#include <stdlib.h>
#include <string.h>
int main(int argc,char* argv[]){
	if(argc<2){
		fprintf(stderr,"argc too little\n");
		exit(1);
	}
	//printf("%s %s\n",__DATE__,__TIME__);
	time_t t =time(NULL);
	struct tm* p_time=localtime(&t);
	FILE* file=fopen(argv[1],"a+");
	if(NULL == file){
		fprintf(stderr,"fopen errno\n");
		exit(1);	
	}
	if(fputs(asctime(p_time),file)==EOF){
		fprintf(stderr,"fpust errno\n");
		exit(1);	
	}
	
	return 0;
}
